/*
 * +----------------------------------------------------------------------
 * | Copyright (c) 奇特物联 2021-2022 All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed 未经许可不能去掉「奇特物联」相关版权
 * +----------------------------------------------------------------------
 * | Author: xw2sy@163.com
 * +----------------------------------------------------------------------
 */
package cc.iotkit.data.service;

import cc.iotkit.data.mapper.IJPACommData;
import cc.iotkit.data.manager.IOauthClientData;
import cc.iotkit.data.model.TbOauthClient;
import cc.iotkit.model.OauthClient;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Primary
@Service
public class OauthClientDataImpl implements IOauthClientData, IJPACommData<OauthClient, String, TbOauthClient> {

    @Resource
    private OauthClientService oauthClientService;

    @Override
    public OauthClient findByClientId(String clientId) {
        return oauthClientService.findByClientId(clientId);
    }

    @Override
    public OauthClientService getBaseRepository() {
        return oauthClientService;
    }

    @Override
    public Class getJpaRepositoryClass() {
        return TbOauthClient.class;
    }

    @Override
    public Class getTClass() {
        return OauthClient.class;
    }


}
